<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
<!--  stop-->
  <div @click="divClick">
    <button @click.stop="btnClick">1</button>
  </div>
<!--  prevent-->
  <form action="baidu">
    <input type="submit" value="提交" @click.prevent="submitClick">
  </form>
<!--  监听某个按键的点击-->
  <input type="text" @keyup.enter="keyUp">
</div>
<script src="../vue.js"></script>
<script>
  window.onload=function () {
    const app = new Vue({
      el: '#app',
      data: {
        message: 'hello'
      },
      methods:{
        btnClick(){
          console.log('btnClick')
        },
        divClick(){
          console.log('divClick')
        },
        submitClick(){
          console.log('submitClick')
        },
        keyUp(){
          console.log('keyUp')
        }
      }
    })
  }

</script>
</body>
</html>
